package cn.kuang.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 徽州大都督
 * @date 2020/7/19
 */
@TableName(value = "administrator")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Administrator implements Serializable{

    @TableId("admin_id")
    private String adminId;
    private String adminName;
    private String adminTelephone;
    private String adminEmail;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date loginTime;  //上次登录时间
    private Integer status;
    private String password;
    @TableField(exist = false)
    private String roleName;  //权限名称
    @TableLogic
    private Integer deleted;
    @TableField(exist = false)
    private Role role;
    private Integer loginCount;
}
